<template>
    这是sub_comp
</template>

<script>
    export default {
        name: "SubComp",
        props: {
            one: {
                type: String
            },
            two: {
                type: String
            }
        },
        setup(props, context) {
            console.log("setup")
            console.log(this + " 没有this，因在创建组件之前")
            console.log(props)
            context.emit("myadd", '少见爷')
        },
        beforeCreate() {
            console.log("1")
        },
        created() {
            console.log("2")
            console.log(this)
        }
    }
</script>

<style scoped>

</style>
